/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ta.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 附件Entity
 * 
 * @author TTAO
 * @version 2017-06-05
 */
public class StAttachment extends DataEntity<StAttachment> {

	private static final long serialVersionUID = 1L;
	private String aid; // aid
	private String magicNumber; // magic_number
	private String extName; // ext_name
	private byte[] data; // data
	private String name; // 附件真实名称
	private String ftpPath; // 附件在FTP服务器上的路径

	public StAttachment() {
		super();
	}

	public StAttachment(String id) {
		super(id);
	}

	@Length(min = 1, max = 36, message = "aid长度必须介于 1 和 36 之间")
	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	@Length(min = 1, max = 32, message = "magic_number长度必须介于 1 和 32 之间")
	public String getMagicNumber() {
		return magicNumber;
	}

	public void setMagicNumber(String magicNumber) {
		this.magicNumber = magicNumber;
	}

	@Length(min = 1, max = 16, message = "ext_name长度必须介于 1 和 16 之间")
	public String getExtName() {
		return extName;
	}

	public void setExtName(String extName) {
		this.extName = extName;
	}

	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}

	@Length(min = 0, max = 255, message = "附件真实名称长度必须介于 0 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min = 0, max = 255, message = "附件在FTP服务器上的路径长度必须介于 0 和 255 之间")
	public String getFtpPath() {
		return ftpPath;
	}

	public void setFtpPath(String ftpPath) {
		this.ftpPath = ftpPath;
	}

}